<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../代码/01-react基础/lib/react.development.js"></script>
    <script src="../代码/01-react基础/lib/react-dom.development.js"></script>
    <script src="../代码/01-react基础/lib/babel.min.js"></script>
</head>

<body>
    <div id="root"></div>
</body>
<script type="text/babel">
    const root = ReactDOM.createRoot(document.getElementById('root'))

    class Header extends React.Component {
        render() {
            return (
                <div>
                    <h1>{this.props.title}</h1>
                    <p>{this.props.content}</p>
                </div>
            )
        }
    }

    root.render(
        <>
            <Header title="我是标题" content="我是内容" />
        </>
    )
</script>

</html>